import { Stencil } from '@antv/x6-plugin-stencil'

export default function createStencil(container, graph, otherConfig = {}) {
  const stencil = new Stencil({
    target: graph,
    stencilGraphWidth: 260,
    stencilGraphHeight: 180,
    collapsable: false,
    groups: [
      {
        title: '',
        name: 'group1',
      },
    ],
    layoutOptions: {
      columns: 3,
      columnWidth: 80,
      rowHeight: 55,
    },
    ...otherConfig
  })

  container.appendChild(stencil.container)

  return stencil
}